Skip to content

Wire programming runtime, fake Soft-AP, and LongFred firmware OTA - #2

Merged
keskad merged 6 commits into
mainfrom
feat/longfred-firmware-ota
Aug 20, 2026
Merged

Wire programming runtime, fake Soft-AP, and LongFred firmware OTA#2
keskad merged 6 commits into
mainfrom
feat/longfred-firmware-ota

Conversation

@keskad

@keskad keskad commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Programming runtime and fake Soft-AP (#3)

  • Run scan/probe/program on a tokio worker over nl80211, so jobs actually execute instead of staying queued.
  • Add wp-fake plus --interface fake / fake subcommand for hardware-free Soft-AP HTTP testing.

LongFred firmware update over Soft-AP, LAN, and USB

  • Add updateFirmware / wireless-programmer update-firmware --mode ap|lan|usb to upload LongFred firmware.
  • Soft-AP and LAN POST .app.bin to /api/v1/firmware (120 s, no retries). LAN discovery via mDNS _longfred-ota._tcp (scan --mode lan) or --host.
  • USB runs espflash on a serial port (ELF, merged .bin, or .app.bin); scan --mode usb lists ports.
  • Firmware jobs emit a job.watch heartbeat every 3 s so a 10 s idle client does not drop the stream. job cancel kills espflash and aborts an in-flight POST. CLI default watch idle is 180 s (USB) / 120 s (HTTP) when --timeout is omitted.
  • Advertise supportsFirmwareUpdate (LongFred true, WiFred false).

Supersedes #3.

Test plan

  • cargo test --workspace and cargo clippy --workspace --all-targets -- -D warnings
  • wireless-programmer --interface fake then scan / probe / program against the in-process mock
  • wireless-programmer fake --driver longfred serves HTTP without a daemon
  • wireless-programmer hello shows supportsFirmwareUpdate on longfred
  • Fake LongFred: POST /api/v1/firmware with a non-empty body returns 200
  • Soft-AP: update-firmware --mode ap --driver longfred --key <bssid> --file *.app.bin after the 8 s chord
  • LAN: Extras → Firmware update on the throttle, then scan --mode lan and update-firmware --mode lan --host <ipv4> --file *.app.bin
  • USB: update-firmware --mode usb --port /dev/ttyUSB0 --file <elf> --partition-table partitions.csv streams progress past 10 s
  • program is unchanged (Soft-AP settings only)

keskad and others added 4 commits August 12, 2026 07:54
Complete scan/probe/program over nl80211 with a tokio worker, and add
wp-fake plus --interface fake / fake subcommand for hardware-free testing.

Co-authored-by: Cursor <cursoragent@cursor.com>
Queue POST /api/v1/firmware as an updateFirmware job, discover STA hosts via
mDNS, and keep settings programming on Soft-AP only.

Co-authored-by: Cursor <cursoragent@cursor.com>
Scan serial ports and flash ELF, merged .bin, or .app.bin with --mode usb
so the first dual-slot install does not require a manual espflash invocation.

Co-authored-by: Cursor <cursoragent@cursor.com>
espflash and the firmware POST block without progress frames, so the 10s
client idle dropped the watch. Heartbeat every 3s, honour job cancel, and
default update-firmware watch idle to the flash/POST deadline.

Co-authored-by: Cursor <cursoragent@cursor.com>
@keskad keskad changed the title Add LongFred HTTP firmware update (Soft-AP and LAN) Add LongFred firmware update over Soft-AP, LAN, and USB Aug 15, 2026
@keskad keskad changed the title Add LongFred firmware update over Soft-AP, LAN, and USB Wire programming runtime, fake Soft-AP, and LongFred firmware OTA Aug 20, 2026
@keskad
keskad changed the base branch from feat/runtime-and-fake-mode to main August 20, 2026 14:03
keskad and others added 2 commits August 20, 2026 16:11
Co-authored-by: Cursor <cursoragent@cursor.com>
Align flat JSON with the Go client, keep the radio slot until jobs finish
tearing down, and harden scan/mDNS/nl80211 paths used during firmware jobs.

Co-authored-by: Cursor <cursoragent@cursor.com>
@keskad
keskad merged commit 6d2de89 into main Aug 20, 2026
4 checks passed
@keskad
keskad deleted the feat/longfred-firmware-ota branch August 20, 2026 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant